# script1702 - Properly handle Division Errors
# Written by Blum and Bresnahan
#
#####################################################
#
################## Functions ########################
#
def divide_it():
	print()
#
	try:
		# Get numbers to divide
		number=int(input("Please enter number to divide: "))
		print()
		divisor=int(input("Please enter the divisor: "))
		print()
		#
		# Divide the numbers
		result=number / divisor
		print("The result is:", result)
#
	except ZeroDivisionError:
		print("You cannot divide a number by zero.")
		print("Script terminating....")
		print()
#
	except ValueError:
		print("Numbers entered must be digits.")
		print("Script terminating....")
		print()
#
############## Mainline #############################
#
def main ():
	divide_it()
#
############ Call the Main Function ###################
#
main()
